import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';

@Component({
  selector: 'chat-room',
  templateUrl: './chat-room.component.html',
  styleUrls: ['./chat-room.component.scss']
})
export class ChatRoomComponent implements OnInit {

  /**好友id */
  userId: string;

  messages: any[];

  constructor(
    private _router: Router,
    private _activateRoute: ActivatedRoute,
  ) {}

  sendMessage(event: any) {

  }

  ngOnInit() {
    this._activateRoute.paramMap.subscribe((url) => {
      this.userId = url.get('id');
    })
  }
}
